namespace Mbl.ParameterizedTest.FluentCollectionBuilding.Expectors.StringExpectations
{
    public class ContainsExpectation : PredicateExpectation<string>
    {
        private readonly string _expected;

        public ContainsExpectation(string expectedPart)
            : base(actual => actual.Contains(expectedPart))
        {
            _expected = expectedPart;
        }

        protected override string GetErrorMessage(string actual)
        {
            return $"Expected '{actual}' to contain '{_expected}'";
        }
    }
}